/*
 * hal_canfd_communicator.h
 *
 *  Created on: 2025 Jul 6
 *      Author: SFLYs
 */

#ifndef XTSPINELIB_HAL_DRIVERS_HAL_CANFD_COMMUNICATOR_H_
#define XTSPINELIB_HAL_DRIVERS_HAL_CANFD_COMMUNICATOR_H_
#include "driverlib.h"
#include "string.h"

typedef enum{
  XT_HAL_FLeg_CAN = 0,
  XT_HAL_RLeg_CAN = 1,
}xt_hal_candevice;//can设备

typedef struct{
    uint32_t can_id;                //设备自身can id
    uint8_t  candata[8];      //发送数据帧
}xt_hal_canmessage_t;

void XT_Hal_CanFD_SendMessage(xt_hal_candevice candevice,xt_hal_canmessage_t *message);
void XT_Hal_CANFD_RecvMessage(xt_hal_candevice candevice,xt_hal_canmessage_t *message);
#endif /* XTSPINELIB_HAL_DRIVERS_HAL_CANFD_COMMUNICATOR_H_ */
